const app = getApp()
const WXAPI = require("../../../../api/newApi")
Page({

  /**
   * 页面的初始数据
   */
  data: {
    info: {},
    imgHttp: app.globalData.imgHttp,
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
      statusHeight: app.gettop.height,
      status: app.gettop.status,
      navHeight: app.gettop.navHeight,
      mobbleBottom: app.mobile.mobbleBottom,
    })
    console.log(options.detail)
    // options.detail = '{"wealCardId":"1480806300255993858","assetId":"1","name":"1-08-福利卡","worth":500,"validityType":"2","validityStartTime":"","validityEndTime":"2022-01-27 10:42:14","individuationCardCover":"group1/M00/00/0E/rBAAD2GSPwmAVRuqAAEATr9BC2Y542.jpg","associationName":"","shopNameList":[],"assetIntroduce":"","exclusiveList":[],"contractPath":"","validityTypeDict":"限制时间"}'
    this.data.info = JSON.parse(options.detail)
    this.setData({
      info: this.data.info
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },
  jumpPaycard(){
    wx.navigateTo({
      url: '/userPageA/pages/welfareCard/payCard/payCard',
    })
  },
  jumpCard() {
    wx.navigateTo({
      url: '/ecCanvas/pages/myShareholderCard/otherCarddetail/otherCarddetail?assetId=' + this.data.info.assetId + '&id=' + this.data.info.wealCardId,
    })
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  // onReachBottom: function () {

  // },

  /**
   * 用户点击右上角分享
   */
  // onShareAppMessage: function () {

  // }
})